{% extends "base.html" %}

{% block header%}
<title>机器任务配置编辑</title>
{% endblock %}

{% block content %}
{% with model_name='MachineTask' url_prefix='/pack/machine/machine_task' %}
<div class="bar">
	<a>机器任务管理</a> -> 机器任务配置编辑
	<div class="buttons">
		<a  class="btn btn-app btn-grey btn-xs radius-4 pull-right submit"  />保存</a>
	</div>
</div>

<form action="{{url_prefix}}?id={{model.id}}" method="post">
	<table class="form2">
	<tr>
		<th>机器IP：</th>
        <td>
            <input type="text" value="{{model.ip}}" readonly="readonly" />
        </td>
	</tr>
	<tr>
		<th>项目名称：</th>
        <td>
            <select id="pro_id_select" name="pro_id">
                {% for p in project_objs %}
                    <option value="{{p.id}}">{{p.pro_name}}</option>
                {% endfor %}
            </select>
        </td>
	</tr>
	<tr>
        <th>任务:</th>
        <td>
            <select id="task_type_select" name="task_type">
                {% for v,n in task_type %}
                    <option value="{{v}}" {% if model.state == v %}selected="selected"{% endif %}>{{n}}</option>
                {% endfor %}
            </select>
        </td>
    </tr>
</table>
</form>
{% endwith %}
{% endblock %}